package com.jumi.microservice.service.pdd;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.jumi.microservice.common.utils.HttpClientUtil;

import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.util.Map;
import java.util.stream.IntStream;

/**
 * @author scw
 * @date 2021/1/11
 */
public class PddTest {
    public static void main(String[] args) {
//        String jsonStr3 = "{\"goods_search_response\":{\"goods_list\":[{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"床上用品\",\"coupon_remain_quantity\":26000,\"promotion_rate\":140,\"cat_ids\":[9313,9326,9502],\"coupon_min_order_amount\":100000,\"category_id\":11132,\"service_tags\":[13],\"mall_coupon_discount_pct\":0,\"mall_id\":283784407,\"mall_name\":\"家纺之源远流长\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"高\",\"goods_name\":\"纯天然恒源祥蚕丝被100%桑蚕丝冬季冬被12斤加厚保暖被子被芯春秋\",\"sales_tip\":\"8751\",\"only_scene_auth\":false,\"goods_id\":204452044054,\"predict_promotion_rate\":140,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"纯天然恒源祥蚕丝被100%桑蚕丝冬季冬被12斤加厚保暖被子被芯春秋\",\"opt_name\":\"床上用品\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-29/23b97889c3a1dfa32e14ef98ebe1191e.jpeg\",\"opt_ids\":[11141,11143,10696,1064,5769,21513,21515,10732,12,5772,10702,9646,20527,9647,818,9650,8569,8570,8602,8571,8603,8604,11132,223],\"opt_id\":11132,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-29/b3ede9b1-2a23-4120-bd19-f2e1f5d42dd1.jpeg.a.jpeg\",\"activity_tags\":[10583,10000,21,10044,10582],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":168800,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610125200,\"min_group_price\":112800,\"mall_cps\":1,\"coupon_discount\":100000,\"goods_sign\":\"c932jfAEY4JKv7uxwfDYgDJRuBcq_JQEu6gs1nx\",\"coupon_end_time\":1610467199,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"洗护\",\"coupon_remain_quantity\":46000,\"promotion_rate\":350,\"cat_ids\":[17285,17286,17325],\"coupon_min_order_amount\":2000,\"category_id\":10110,\"service_tags\":[13],\"mall_coupon_discount_pct\":0,\"mall_id\":994944589,\"mall_name\":\"长脚欧巴\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"高\",\"goods_name\":\"【4支超值】正品云南中药牙膏美白去黄牙垢烟渍去口臭护龈家庭装\",\"sales_tip\":\"10万+\",\"only_scene_auth\":false,\"goods_id\":204883004497,\"predict_promotion_rate\":350,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"【4支超值】正品云南中药牙膏美白去黄牙垢烟渍去口臭护龈家庭装\",\"opt_name\":\"洗护\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-30/29180d970d82abb06d88132a9780afe9.jpeg\",\"opt_ids\":[10113,11201,22146,10696,328,10697,12,8590,10702,8591,15,10127,8592,10710,407,21919,10730,299,304,11187,20787,22134,8569,8570,8571,10110],\"opt_id\":10110,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-30/6466c12e-8bec-4e0f-8e42-e22d53657421.jpeg.a.jpeg\",\"activity_tags\":[10353,10354,10355,10044,10352,10351,10078,10624],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3990,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610294400,\"min_group_price\":2990,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9v2jdm0csVKv7uxwfDYgKn_2AM8_JybPFyvNv\",\"coupon_end_time\":1610812799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"洗护\",\"coupon_remain_quantity\":46000,\"promotion_rate\":350,\"cat_ids\":[17285,17286,17325],\"coupon_min_order_amount\":2000,\"category_id\":10110,\"service_tags\":[13],\"mall_coupon_discount_pct\":0,\"mall_id\":982135499,\"mall_name\":\"麻花小鹿\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"高\",\"goods_name\":\"【超值4支装】正品云南中药牙膏美白去黄牙垢去口臭去烟渍家庭装\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":193571559327,\"predict_promotion_rate\":350,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"【超值4支装】正品云南中药牙膏美白去黄牙垢去口臭去烟渍家庭装\",\"opt_name\":\"洗护\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-10-28/6ced81bcda6305266306438c5142f52e.jpeg\",\"opt_ids\":[10113,11201,22146,10696,328,10697,12,8590,10702,8591,15,10127,8592,10710,407,21919,10730,299,304,11187,20787,22134,8569,8570,8571,10110],\"opt_id\":10110,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-10-22/1e306506-a26f-4a04-a80f-e59a1bbf5600.jpeg.a.jpeg\",\"activity_tags\":[10044,10000,10624,21,10078],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3990,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610294400,\"min_group_price\":2990,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9L2j3uNaQtKv7uxwfDYgDLr0mx8_JQcW8my62m\",\"coupon_end_time\":1610812799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"洗护\",\"coupon_remain_quantity\":42000,\"promotion_rate\":280,\"cat_ids\":[17285,17288,17360],\"coupon_min_order_amount\":2000,\"category_id\":10110,\"service_tags\":[24,13],\"mall_coupon_discount_pct\":0,\"mall_id\":1201106,\"mall_name\":\"美容道COCO个人护理\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"高\",\"goods_name\":\"牛奶精油美肌沐浴露美白保湿滋润家庭装持久留香身体乳洗发水男女\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":172358597642,\"predict_promotion_rate\":280,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"牛奶精油美肌沐浴露美白保湿滋润家庭装持久留香身体乳洗发水男女\",\"opt_name\":\"洗护\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-05/3c6a79475eae9a510fd34b080a0922d9.jpeg\",\"opt_ids\":[10113,11205,10696,328,10697,12,8590,10702,10126,8591,15,8592,10710,409,21920,10730,299,301,11187,20787,22134,8569,22137,8570,8571,10110],\"opt_id\":10110,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-05/13923822-cee3-488f-aff6-c81c9f5d45e7.jpeg.a.jpeg\",\"activity_tags\":[10353,10044,10351,10354,10355,10352,10000,21,10624],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3180,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1606579200,\"min_group_price\":2980,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9X2iksRgp5Kv7uxwfDYgHlwQDv__J8zqKsjuD\",\"coupon_end_time\":1612108799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"内衣\",\"coupon_remain_quantity\":46000,\"promotion_rate\":210,\"cat_ids\":[8583,8606,8631],\"coupon_min_order_amount\":2000,\"category_id\":9527,\"service_tags\":[24,13],\"mall_coupon_discount_pct\":0,\"mall_id\":60749,\"mall_name\":\"REALDISCOUNT\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"低\",\"goods_name\":\"【5-10双装】袜子男冬季防臭运动袜子防滑吸汗简约中筒袜浅口短袜\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":1907054346,\"predict_promotion_rate\":210,\"desc_txt\":\"低\",\"mall_coupon_id\":0,\"goods_desc\":\"【5-10双装】袜子男冬季防臭运动袜子防滑吸汗简约中筒袜浅口短袜\",\"opt_name\":\"内衣\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-08-12/161d16eef58c22cb5dac3f7e571daf7c.jpeg\",\"opt_ids\":[24257,1282,24258,24259,1348,8199,10696,6218,1354,1291,6219,1355,12,1292,6220,20493,10703,1295,9555,8599,11927,8600,8601,347,20574,351,20575,1760,225,1764,11944,11945,20521,10733,1774,9527,8569,9529,8570,9530,8571,9531,2623],\"opt_id\":9527,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-07-31/b33920e4-451f-4237-8a78-3b176dabad67.jpg.a.jpeg\",\"activity_tags\":[10352,10037,10000,10355,10354,10353,21,10351],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3190,\"mall_coupon_start_time\":0,\"serv_txt\":\"低\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610294400,\"min_group_price\":2860,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9r2ohvlqZ5Kv7uxwfDYgJeO1Dnw_JcnFiT7YU\",\"coupon_end_time\":1612108799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"茶\",\"coupon_remain_quantity\":27500,\"promotion_rate\":434,\"cat_ids\":[6586,6597,6601],\"coupon_min_order_amount\":2000,\"category_id\":11906,\"service_tags\":[24,9,13],\"mall_coupon_discount_pct\":0,\"mall_id\":938602409,\"mall_name\":\"浩轩堂亿松源专卖店\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":4,\"lgst_txt\":\"高\",\"goods_name\":\"决明子菊花茶牛蒡根枸杞胎菊桂花金银花去火养肝护肝清热花茶40包\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":95816187139,\"predict_promotion_rate\":434,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"决明子菊花茶牛蒡根枸杞胎菊桂花金银花去火养肝护肝清热花茶40包\",\"opt_name\":\"茶\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-08-30/9ffcff8547f9c6b2276375c6e58c3bf7.jpeg\",\"opt_ids\":[20736,1,11906,10724,11910,230,8584,10696,8585,10761,8586,10700,10764,12,118,9975,8569,121,8570,8571,219,10044,9983],\"opt_id\":11906,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-08-30/dffba1da-e95e-4167-9cf1-802fed3565a9.jpeg.a.jpeg\",\"activity_tags\":[10595,10605,10037,10000],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3000,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1609084800,\"min_group_price\":2870,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9v2tCVYA5dKv7uxwfDYgKkwTVLv_JJb48J6zL\",\"coupon_end_time\":1612108799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"内衣\",\"coupon_remain_quantity\":46000,\"promotion_rate\":140,\"cat_ids\":[8583,8594,8619],\"coupon_min_order_amount\":2000,\"category_id\":1282,\"service_tags\":[24,13],\"mall_coupon_discount_pct\":0,\"mall_id\":750803631,\"mall_name\":\"琪美儿服饰\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"低\",\"goods_name\":\"4条抗菌男四角内裤男生平角裤头男士内裤运动奢华潮男内裤青年裤\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":86256233834,\"predict_promotion_rate\":140,\"desc_txt\":\"低\",\"mall_coupon_id\":0,\"goods_desc\":\"4条抗菌男四角内裤男生平角裤头男士内裤运动奢华潮男内裤青年裤\",\"opt_name\":\"内衣\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-07/1cd297a0f40a071ea13feaecd9fc78e5.jpeg\",\"opt_ids\":[1282,3210,1291,12,1292,20493,8599,11927,8600,8601,22300,22301,11935,11937,20519,23601,23602,23603,23604,5301,23605,23606,9527,23607,23608,9529,9530,9531,1341,1347,5315,5316,5317,5318,5319,10696,5320,5321,9547,9550,10703,8146,9554,8147,8148,20564,8149,20565,8150,8151,8152,9560,347,351,225,10733,8569,8570,8571],\"opt_id\":1282,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-07/e974ced0-43bb-429e-9b7a-0ecd9a051b35.jpeg.a.jpeg\",\"activity_tags\":[10595,10000,10641],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":4400,\"mall_coupon_start_time\":0,\"serv_txt\":\"低\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610294400,\"min_group_price\":2858,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9X2tn8LU_5Kv7uxwfDYgKoNsAkm_JQrRzTauB4\",\"coupon_end_time\":1612108799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"水果\",\"coupon_remain_quantity\":46000,\"promotion_rate\":105,\"cat_ids\":[8172,8182,8250],\"coupon_min_order_amount\":500,\"category_id\":13,\"service_tags\":[24,9,13],\"mall_coupon_discount_pct\":0,\"mall_id\":682660930,\"mall_name\":\"动动客旗舰店\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":3,\"lgst_txt\":\"高\",\"goods_name\":\"湖南麻阳冰糖橙新鲜水果超甜橙子现摘甜橙整箱手剥橙10斤装\",\"sales_tip\":\"1.7万\",\"only_scene_auth\":false,\"goods_id\":215429852395,\"predict_promotion_rate\":105,\"desc_txt\":\"高\",\"mall_coupon_id\":0,\"goods_desc\":\"湖南麻阳冰糖橙新鲜水果超甜橙子现摘甜橙整箱手剥橙10斤装\",\"opt_name\":\"水果\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-05/83f260f3a9e870a6df7b923e85853664.jpeg\",\"opt_ids\":[5121,5122,10723,22884,165,10696,22280,22281,22922,9419,10700,140,9420,13,12402,9439,22879],\"opt_id\":13,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-05/ae10777d-0299-44e9-8cb8-bfcf8c21e73d.jpeg.a.jpeg\",\"activity_tags\":[10650,21],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":1890,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610370000,\"min_group_price\":1590,\"mall_cps\":1,\"coupon_discount\":500,\"goods_sign\":\"c9T2kELQUn9Kv7uxwfDYgJgYe2zA_JDAe7FNzO\",\"coupon_end_time\":1610974799,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":5000,\"plan_type\":2,\"category_name\":\"床上用品\",\"coupon_remain_quantity\":3100,\"promotion_rate\":280,\"cat_ids\":[9313,9326,9502],\"coupon_min_order_amount\":30000,\"category_id\":11132,\"service_tags\":[13],\"mall_coupon_discount_pct\":50,\"mall_id\":780825068,\"mall_name\":\"好礼多超市\",\"coupon_total_quantity\":5000,\"mall_coupon_end_time\":1616601599,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"高\",\"goods_name\":\"2021款高质礼品装蚕丝被\",\"sales_tip\":\"175\",\"only_scene_auth\":true,\"goods_id\":215912673840,\"predict_promotion_rate\":280,\"desc_txt\":\"高\",\"mall_coupon_id\":1616601599,\"goods_desc\":\"2021款高质礼品装蚕丝被\",\"opt_name\":\"床上用品\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-07/e2b083405d842a176ce8cbb5d4352d9a.jpeg\",\"opt_ids\":[11141,11143,10696,1064,5769,21513,21515,10732,12,5772,10702,9646,20527,9647,818,9650,8569,8570,8602,8571,8603,8604,11132,223],\"opt_id\":11132,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-07/393b5c75-6122-4753-86d2-926447db7de9.jpeg.a.jpeg\",\"activity_tags\":[10641],\"has_mall_coupon\":true,\"has_coupon\":true,\"min_normal_price\":99900,\"mall_coupon_start_time\":1608825600,\"serv_txt\":\"高\",\"mall_coupon_total_quantity\":5000,\"mall_coupon_max_discount_amount\":30000,\"coupon_start_time\":1609948800,\"min_group_price\":89900,\"mall_cps\":1,\"coupon_discount\":30000,\"goods_sign\":\"c932kC8rDKRKv7uxwfDYgPu8UYiU_J5sIJIpDh\",\"coupon_end_time\":1614527999,\"zs_duo_id\":0},{\"mall_coupon_remain_quantity\":0,\"plan_type\":2,\"category_name\":\"洗护\",\"coupon_remain_quantity\":46000,\"promotion_rate\":210,\"cat_ids\":[17285,17286,17325],\"coupon_min_order_amount\":2000,\"category_id\":10110,\"service_tags\":[24,27],\"mall_coupon_discount_pct\":0,\"mall_id\":8280550,\"mall_name\":\"勇闯天涯皮具\",\"coupon_total_quantity\":50000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":1,\"lgst_txt\":\"低\",\"goods_name\":\"【全国爆卖】牙膏竹炭黑牙膏美白牙齿美白神器去黄牙结石去口臭\",\"sales_tip\":\"10万+\",\"only_scene_auth\":true,\"goods_id\":132599975675,\"predict_promotion_rate\":210,\"desc_txt\":\"低\",\"mall_coupon_id\":0,\"goods_desc\":\"【全国爆卖】牙膏竹炭黑牙膏美白牙齿美白神器去黄牙结石去口臭\",\"opt_name\":\"洗护\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-07-31/4e29bb906929a537bd8e876cfc9f3232.jpeg\",\"opt_ids\":[10113,11201,22146,10696,328,10697,12,8590,10702,8591,15,10127,8592,10710,407,21919,10730,299,304,11187,20787,22134,8569,8570,8571,10110],\"opt_id\":10110,\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-07-31/ff7b5cd4-c9a8-4d74-9808-843c34e4fa45.jpg.a.jpeg\",\"activity_tags\":[21,10000],\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":3289,\"mall_coupon_start_time\":0,\"serv_txt\":\"低\",\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1610294400,\"min_group_price\":2990,\"mall_cps\":1,\"coupon_discount\":2000,\"goods_sign\":\"c9_2vLXd8G9Kv7uxwfDYgEQuo0iB_J4YeNdmtU\",\"coupon_end_time\":1614614399,\"zs_duo_id\":0}],\"list_id\":\"1610414088414_75c44b15f385d3ebfb08a020e948e3ef\",\"total_count\":184010,\"request_id\":\"16104140883206568\",\"search_id\":\"568f1a42e4cf34a9faec4efd8fb3762b243\"}}";
//        System.out.println(jsonStr3);
//        JSONObject parseObject = JSONObject.parseObject(jsonStr3).getJSONObject("goods_search_response");
//        String goodsJson = parseObject.getString("goods_list");
//        JSONArray goodsArray = JSONArray.parseArray(goodsJson);
//        IntStream.range(0, goodsArray.size()).forEachOrdered(i -> {
//        JSONObject objJson = goodsArray.getJSONObject(i);
//        double promotionRate = Double.valueOf(objJson.get("promotion_rate").toString()) * 50 / 100;
//        int payAmount = Integer.valueOf(objJson.get("min_normal_price").toString()) - Integer.valueOf(objJson.get("coupon_discount").toString());
//        //比价行为预判定佣金，需要用户备案
//        objJson.put("predict_promotion_rate", new DecimalFormat(".##").format(Double.valueOf(objJson.get("predict_promotion_rate").toString()) * 50 / 100));
//        //佣金比例,千分比
//        objJson.put("promotion_rate", new DecimalFormat(".##").format(promotionRate));
//        //佣金
//        objJson.put("promotion_price", new DecimalFormat(".##").format(promotionRate * payAmount / 1000 / 100));
//        goodsArray.set(i, objJson);
//        });
//        parseObject.put("goods_list", goodsArray);
//        JSONObject parseObjectJson = new JSONObject();
//        parseObjectJson.put("goods_search_response", parseObject);
//        jsonStr3 = parseObjectJson.toJSONString();
//        System.out.println(jsonStr3);

//        String jsonStr4 = "{\"goods_basic_detail_response\":{\"total\":1000,\"list_id\":\"80b467ca-0e65-4332-b927-d0af143c980d\",\"list\":[{\"coupon_remain_quantity\":42000,\"promotion_rate\":210,\"cat_ids\":[6630,6631,6640,7568],\"coupon_min_order_amount\":3000,\"mall_id\":852631497,\"mall_name\":\"千禾旗舰店\",\"coupon_total_quantity\":50000,\"merchant_type\":\"3\",\"lgst_txt\":\"高\",\"goods_name\":\"千禾春曲原酿酱油1.28L*2瓶 零添加酱油 一级生抽 烹饪炒菜点蘸\",\"sales_tip\":\"6.2万\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-11-11/1b4db37c-9bfb-4fcd-8434-e1f4164d089c.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/5b865269-9278-413e-87f1-cd82d0df2732.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/dec9ae02-d55b-4ce6-8d49-1de12be8c4aa.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/a129a818-8ff5-4d31-85f9-cbb8062c9c21.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/defb826d-35d8-4e1b-bfc4-7beb84d98b47.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/788c4d1b-782c-477f-a630-22dac04f9842.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/babb94d3-7e56-4fc5-9e7b-3736abbf25f1.jpeg.a.jpeg\"],\"goods_id\":199150011142,\"desc_txt\":\"高\",\"predict_promotion_rate\":210,\"goods_desc\":\"千禾春曲原酿酱油1.28L*2瓶 零添加酱油 一级生抽 烹饪炒菜点蘸\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-25/f684d1c353e576db0929e56bd67792f3.jpeg\",\"share_rate\":0,\"opt_id\":\"1\",\"opt_ids\":[1,10723,20740,8584,10696,232,8585,10025,8586,10700,12,22926,22931,11542,9975,8569,8570,8571,219,124,9980,22972,127,11839],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-11/788c4d1b-782c-477f-a630-22dac04f9842.jpeg.a.jpeg\",\"has_coupon\":true,\"min_normal_price\":6290,\"serv_txt\":\"高\",\"coupon_start_time\":1610035200,\"min_group_price\":5990,\"coupon_discount\":3000,\"goods_sign\":\"c972jDQK_ZJKv7uxwfbYgCWsRlb6_JDri46e5d\",\"coupon_end_time\":1612108799},{\"coupon_remain_quantity\":0,\"promotion_rate\":7,\"cat_ids\":[8172,8182,8255],\"coupon_min_order_amount\":0,\"mall_id\":340099389,\"mall_name\":\"绿纯农水果生鲜官方旗舰店\",\"coupon_total_quantity\":0,\"merchant_type\":\"3\",\"lgst_txt\":\"高\",\"goods_name\":\"广西桂林阳朔黄金小金桔滑皮水果脆甜清香蜜橘新鲜时令鲜果小橘子\",\"sales_tip\":\"1521\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-12-23/c58c4ba4-77c9-406e-acb1-68979c9f4467.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/a2b8846c-2b1c-4f89-9fc9-9f7e51308699.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/f56ae7f5-bb45-47de-bec8-319266d2dcd2.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/cdaeb1de-c1d8-4a18-bd8a-5df1c4f7f9e2.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/685ce57e-76a1-4a0c-87a1-bdf997dbef0d.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-04/839feced-0d0a-45e7-8ab7-6c96e964e752.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-04/bd11ae47-daa9-4e1f-996d-9e0fc311a76f.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/541d39f3-80eb-40a9-b335-181152df5d51.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/0f02dc05-b2b7-40ba-8cff-2092f8c0a0e5.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-23/f149ebf0-bcda-4e6c-aaf9-0998bbfe2c2b.jpeg.a.jpeg\"],\"goods_id\":211347290232,\"desc_txt\":\"高\",\"predict_promotion_rate\":7,\"goods_desc\":\"广西桂林阳朔黄金小金桔滑皮水果脆甜清香蜜橘新鲜时令鲜果小橘子\",\"opt_name\":\"水果\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-04/5c758ee03ccae536da5e7f6906ebd790.jpeg\",\"share_rate\":0,\"opt_id\":\"13\",\"opt_ids\":[5121,162,10723,5123,22884,10696,22280,22281,22922,9419,10700,140,9420,13,12402,9436,22879],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-04/839feced-0d0a-45e7-8ab7-6c96e964e752.jpeg.a.jpeg\",\"has_coupon\":false,\"min_normal_price\":2398,\"serv_txt\":\"高\",\"coupon_start_time\":0,\"min_group_price\":2298,\"coupon_discount\":0,\"goods_sign\":\"c9n2k18JRuxKv7uxwfbYgF5stRfu_JxEmnSp52\",\"coupon_end_time\":0},{\"coupon_remain_quantity\":0,\"promotion_rate\":7,\"cat_ids\":[17285,17297,17406],\"coupon_min_order_amount\":0,\"mall_id\":604958734,\"mall_name\":\"泰博家居日用\",\"coupon_total_quantity\":0,\"merchant_type\":\"1\",\"lgst_txt\":\"高\",\"goods_name\":\"医用级75%酒精湿巾纸杀菌消毒湿纸巾婴儿童成人学生小包带盖家用\",\"sales_tip\":\"1.2万\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-11-23/f0e98f58-2031-41d2-874f-4ac88a82bf88.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-24/d5a161fa-0d33-4324-ac4e-0a7ef56293e5.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/0ee7a967-c8ce-46a8-be2d-163984fe10ba.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/ca3b4da1-960b-46db-924a-7446d9c80366.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/b1fae673-cd05-4671-97a6-117e6c278559.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/2e9f7137-af92-45d5-9b43-c6cfefa98f3c.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/a2913de9-9b03-478d-a00f-3956aa928f3e.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-23/59419b40-7934-4b0b-85e4-60b12f1272e4.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-05/96e55fb5-b4ff-4765-8900-2e291ae4f582.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-05/26a82e52-efa0-4945-91ac-81550e598a3a.jpeg\"],\"goods_id\":202744305957,\"desc_txt\":\"高\",\"predict_promotion_rate\":7,\"goods_desc\":\"医用级75%酒精湿巾纸杀菌消毒湿纸巾婴儿童成人学生小包带盖家用\",\"opt_name\":\"洗护\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-05/6bcff10f1cf21d89cf125997652c27bf.jpeg\",\"share_rate\":0,\"opt_id\":\"10110\",\"opt_ids\":[10118,10696,361,10730,330,11212,8590,10702,8591,15,20527,8592,11187,22102,8569,8570,22106,8571,21915,10110,10111],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-05/26a82e52-efa0-4945-91ac-81550e598a3a.jpeg\",\"has_coupon\":false,\"min_normal_price\":1180,\"serv_txt\":\"高\",\"coupon_start_time\":0,\"min_group_price\":990,\"coupon_discount\":0,\"goods_sign\":\"c9D2jV7OZ7FKv7uxwfbYgN-rklC3_Jk5zQvWJo\",\"coupon_end_time\":0},{\"coupon_remain_quantity\":0,\"promotion_rate\":7,\"cat_ids\":[8172,8181,8239],\"coupon_min_order_amount\":0,\"mall_id\":686880351,\"mall_name\":\"长白山众品源生鲜官方旗舰店\",\"coupon_total_quantity\":0,\"merchant_type\":\"3\",\"lgst_txt\":\"高\",\"goods_name\":\"玉米新鲜东北黄糯玉米棒黏玉米即食非转基因真空包装黏苞米批发\",\"sales_tip\":\"10万+\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-11-10/10de7331-c534-43ee-b6ef-14394416addb.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-10/3e3918c5-e847-4985-9bdd-cccccb513cde.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-09/eed49251-7487-4b56-99c1-5e251cfe08fc.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-09/129a26f2-4151-429c-995e-ed46095595c3.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-09/8abb2026-c582-4ee5-91ad-f3fe7d4b0b5a.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-09/080ad700-5779-47e6-b3d5-6d7096f09826.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-09/21ceefd1-84fe-4e5c-937f-7ac979d70d73.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-11/b86abc0f-4e31-4892-ad61-c5b68bb020d9.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-14/4063a3cf-65c9-4394-83a8-0d2b656b5ff0.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-11-10/9494baae-b4de-4dfb-8a4b-c22a520f91fb.jpeg.a.jpeg\"],\"goods_id\":198471305980,\"desc_txt\":\"高\",\"predict_promotion_rate\":7,\"goods_desc\":\"玉米新鲜东北黄糯玉米棒黏玉米即食非转基因真空包装黏苞米批发\",\"opt_name\":\"海淘\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-14/bff5f8b397b987b9a715f0710a6883a3.jpeg\",\"share_rate\":0,\"opt_id\":\"10696\",\"opt_ids\":[10723,22884,10696,22280,1096,22281,22921,9419,10700,13,9421,9455,12402,151,22879],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-14/4063a3cf-65c9-4394-83a8-0d2b656b5ff0.jpeg.a.jpeg\",\"has_coupon\":false,\"min_normal_price\":2990,\"serv_txt\":\"高\",\"coupon_start_time\":0,\"min_group_price\":2490,\"coupon_discount\":0,\"goods_sign\":\"c9b2jF-BNGhKv7uxwfbYgDY9UVw0_JJOTOk9Rx\",\"coupon_end_time\":0},{\"coupon_remain_quantity\":26000,\"promotion_rate\":175,\"cat_ids\":[6630,6631,6640,7568],\"coupon_min_order_amount\":0,\"mall_id\":839821501,\"mall_name\":\"食天下o\",\"coupon_total_quantity\":50000,\"merchant_type\":\"1\",\"lgst_txt\":\"高\",\"goods_name\":\"【5斤仅售9.9】味极鲜生抽老抽酱油上色提鲜调味汁家用炒菜凉拌\",\"sales_tip\":\"9158\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-08-04/fb95db12-e55a-4100-bcf6-b78ac240c149.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-04/2f5be774-e630-4e2e-abbf-34edcb3fa687.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-04/bb411a0f-9bbb-47c0-ae9d-b71cc729fbed.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-02/1b000cea-2636-4c8d-8419-710c347952a7.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-02/86123ef8-97a6-4598-ac62-0c8b315af5d0.png.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-02/4566a106-e0e4-4b93-8670-f23a510c5a98.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-02/067802fe-c7b5-44aa-a4e2-cca0a720682e.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-02/99f2edb1-3740-4f00-bc0c-74de46c8543e.jpg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-10-09/1be555b7-2f99-4445-8503-cc1151f2fc7e.png.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-04/e6363108-f59a-427d-9dee-a7ace4f35f60.jpg.a.jpeg\"],\"goods_id\":161522627439,\"desc_txt\":\"高\",\"predict_promotion_rate\":175,\"goods_desc\":\"【5斤仅售9.9】味极鲜生抽老抽酱油上色提鲜调味汁家用炒菜凉拌\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-10-09/c857948b546d601dd9e4d936e6ae6cfc.jpeg\",\"share_rate\":0,\"opt_id\":\"1\",\"opt_ids\":[1,10723,20740,8584,10696,232,8585,10025,8586,10700,12,22926,22931,11542,9975,8569,8570,8571,219,124,9980,22972,127,11839],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-10-09/1be555b7-2f99-4445-8503-cc1151f2fc7e.png.a.jpeg\",\"has_coupon\":true,\"min_normal_price\":3300,\"serv_txt\":\"高\",\"coupon_start_time\":1603814400,\"min_group_price\":2990,\"coupon_discount\":2000,\"goods_sign\":\"c932h_ExTftKv7uxwfbYgOkNwdtW_J0n8Sve44\",\"coupon_end_time\":1616428799},{\"coupon_remain_quantity\":0,\"promotion_rate\":70,\"cat_ids\":[8172,8182,8255],\"coupon_min_order_amount\":0,\"mall_id\":445665065,\"mall_name\":\"高鸣水果生鲜旗舰店\",\"coupon_total_quantity\":0,\"merchant_type\":\"3\",\"lgst_txt\":\"高\",\"goods_name\":\"5/10斤广西武鸣沃柑新鲜水果当季整箱包邮蜜桔橘子糖贡柑皇帝柑\",\"sales_tip\":\"6.3万\",\"goods_gallery_urls\":[\"https://t00img.yangkeduo.com/goods/images/2019-12-06/d3a7488b-07cc-4e0f-805c-3de093d8e394.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/7306bb4c-d0a3-4c80-a65f-db82e5c629d3.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/4b95e7a8-39e8-4fd8-8698-ee446f341f2f.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/ecfbc40e-89e5-442f-8b39-e6d519001635.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/d65d99df-b93a-4a3f-ba97-c562bc49bb44.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/95fe1ddb-9275-4e6b-9103-b36d6ad552cc.jpg\",\"https://t00img.yangkeduo.com/goods/images/2019-12-06/874e5dac-e49b-441b-b9b4-c0ae1a0ec972.jpg\"],\"goods_id\":73426665934,\"desc_txt\":\"高\",\"predict_promotion_rate\":70,\"goods_desc\":\"5/10斤广西武鸣沃柑新鲜水果当季整箱包邮蜜桔橘子糖贡柑皇帝柑\",\"opt_name\":\"水果\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-12-18/39492d5dad99cfee0743b71aa46bf3ec.jpeg\",\"share_rate\":0,\"opt_id\":\"13\",\"opt_ids\":[5121,162,10723,5123,22884,10696,22280,22281,22922,9419,10700,140,9420,13,12402,9436,22879],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://t00img.yangkeduo.com/goods/images/2019-12-06/ecfbc40e-89e5-442f-8b39-e6d519001635.jpg\",\"has_coupon\":false,\"min_normal_price\":1990,\"serv_txt\":\"高\",\"coupon_start_time\":0,\"min_group_price\":980,\"coupon_discount\":0,\"goods_sign\":\"c9L2s3Lc_1pKv7uxwfbYgILSF6TB_JQwG9p7Msc\",\"coupon_end_time\":0},{\"coupon_remain_quantity\":88500,\"promotion_rate\":140,\"cat_ids\":[18814,18857,18902],\"coupon_min_order_amount\":1600,\"mall_id\":332695032,\"mall_name\":\"玉沙医疗器械专卖店\",\"coupon_total_quantity\":100000,\"merchant_type\":\"4\",\"lgst_txt\":\"高\",\"goods_name\":\"玉沙集团一次性医用口罩100只3层防护型成人儿童防飞沫熔喷布口罩\",\"sales_tip\":\"10万+\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2021-01-09/d84aa63b-9c00-4559-976f-ef5574faf163.jpeg.a.jpeg\"],\"goods_id\":190018560767,\"desc_txt\":\"高\",\"predict_promotion_rate\":140,\"goods_desc\":\"玉沙集团一次性医用口罩100只3层防护型成人儿童防飞沫熔喷布口罩\",\"opt_name\":\"医药\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-09/c4d6cc2bbd2a6edad7f7b54449ad84b6.jpeg\",\"share_rate\":0,\"opt_id\":\"23265\",\"opt_ids\":[23265,23270,12007,20743,23271,12009,12,10223,3279,8655,3280,8659,10228,251,10269,222,24030],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-09/d84aa63b-9c00-4559-976f-ef5574faf163.jpeg.a.jpeg\",\"has_coupon\":true,\"min_normal_price\":3490,\"serv_txt\":\"高\",\"coupon_start_time\":1610121600,\"min_group_price\":3090,\"coupon_discount\":1600,\"goods_sign\":\"c9_2jlez3GtKv7uxwfbYgPOr-aEu_JQMWOMgpvX\",\"coupon_end_time\":1611158399},{\"coupon_remain_quantity\":87000,\"promotion_rate\":7,\"cat_ids\":[6398,6399,6419],\"coupon_min_order_amount\":0,\"mall_id\":706923290,\"mall_name\":\"友家干货铺\",\"coupon_total_quantity\":1550000,\"merchant_type\":\"1\",\"lgst_txt\":\"高\",\"goods_name\":\"每日坚果零食大礼包30包成人儿童孕妇混合坚果干果零食礼盒装\",\"sales_tip\":\"10万+\",\"goods_gallery_urls\":[\"https://t00img.yangkeduo.com/goods/images/2020-04-12/ab0ea117-1a81-47c8-80ff-9f38172ab691.jpg\",\"https://img.pddpic.com/mms-material-img/2020-07-09/62bad145-f6e8-42f4-b15b-55bd072945ed.png\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/4656ca40-b219-4c08-a101-a7b1e01a71f1.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/5727baf6-fbcc-4fac-a007-21e3e8cd05f2.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/cbbb214c-0f9e-448c-aff5-f7e9aed3fa22.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/8e4efa33-45a7-43fa-8acb-28e60d244d8e.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/d694ca24-643d-40dc-ad6d-0eea057a1203.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/09130b8d-afaf-4429-8a3f-87bcea90b2b6.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/2fc18f7b-88f0-410c-97a2-a04dcad57046.jpg\",\"https://t00img.yangkeduo.com/goods/images/2020-04-12/096850e1-29ec-4d4b-9cd9-5630d4199e5f.jpg\"],\"goods_id\":106515350374,\"desc_txt\":\"高\",\"predict_promotion_rate\":7,\"goods_desc\":\"每日坚果零食大礼包30包成人儿童孕妇混合坚果干果零食礼盒装\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-04-12/168a1736ff895be3c161d335a96658aa.jpeg\",\"share_rate\":0,\"opt_id\":\"1\",\"opt_ids\":[1,8836,8584,10696,8585,8586,10700,12,22926,22932,23319,10008,22297,219,96,21857,10723,11876,228,22953,5867,9975,8569,8570,8571,9979],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://t00img.yangkeduo.com/goods/images/2020-04-12/096850e1-29ec-4d4b-9cd9-5630d4199e5f.jpg\",\"has_coupon\":true,\"min_normal_price\":7660,\"serv_txt\":\"高\",\"coupon_start_time\":1587052800,\"min_group_price\":7460,\"coupon_discount\":5100,\"goods_sign\":\"c9z2uqaBvfJKv7uxwfbYgJAznqsI_JQ4C7zVaJT\",\"coupon_end_time\":1616428799},{\"coupon_remain_quantity\":0,\"promotion_rate\":70,\"cat_ids\":[8172,8182,8255],\"coupon_min_order_amount\":0,\"mall_id\":568648761,\"mall_name\":\"桂林绿纯农场店\",\"coupon_total_quantity\":0,\"merchant_type\":\"6\",\"lgst_txt\":\"高\",\"goods_name\":\"绿纯农沙糖橘现摘现卖当天下果1斤/2斤/5斤装/10斤装/礼盒10斤装\",\"sales_tip\":\"7290\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-12-25/cf088a92-f6ca-49fc-9b03-e0593662afcb.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-25/62f3bfc5-2dcb-4a8c-ba26-06ec63dc3cf4.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-21/1e4b4b23-a20a-42a1-bc8e-b23b801b65a4.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-21/fd22fedb-fdbe-437a-912b-a0dd03fe8ced.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-21/ceb404e9-7fac-44c9-a6e7-c8b2892d8240.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-21/78a029f6-b43d-44a0-8f70-d85ac711a440.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-25/e3e4fde8-162e-4bc0-bd4c-cefa960488f6.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-25/e169e415-a112-44c7-a7c3-e8fa0702385d.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-25/ae8294d9-608e-49b6-86cb-410c089d14a3.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-12-25/562d35bf-bc2c-40a3-8c91-b998f14e9b48.jpeg.a.jpeg\"],\"goods_id\":211204034480,\"desc_txt\":\"高\",\"predict_promotion_rate\":70,\"goods_desc\":\"绿纯农沙糖橘现摘现卖当天下果1斤/2斤/5斤装/10斤装/礼盒10斤装\",\"opt_name\":\"水果\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-12-23/28f732e7fdab469cfe4866cb9aa4bb31.jpeg\",\"share_rate\":0,\"opt_id\":\"13\",\"opt_ids\":[5121,162,10723,5123,22884,10696,22280,22281,22922,9419,10700,140,9420,13,12402,9436,22879],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-12-21/1e4b4b23-a20a-42a1-bc8e-b23b801b65a4.jpeg.a.jpeg\",\"has_coupon\":false,\"min_normal_price\":1188,\"serv_txt\":\"高\",\"coupon_start_time\":0,\"min_group_price\":1080,\"coupon_discount\":0,\"goods_sign\":\"c9v2k0bzMSRKv7uxwfbYgOfA5kpN_JQMj5kbDCy\",\"coupon_end_time\":0},{\"coupon_remain_quantity\":0,\"promotion_rate\":7,\"cat_ids\":[16548,16663,16673],\"coupon_min_order_amount\":0,\"mall_id\":733877481,\"mall_name\":\"汇录日用\",\"coupon_total_quantity\":0,\"merchant_type\":\"1\",\"lgst_txt\":\"低\",\"goods_name\":\"食品级TPE手套 弹性加厚防油一次性手套餐饮家务美容美发防护手套\",\"sales_tip\":\"2261\",\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2021-01-02/b01125d5-97a5-48bc-9e1f-65ed0f25661b.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/bf36b63a-bd11-4487-bc82-bfb1a7144702.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/82ad61fb-59bb-46ab-bc7f-54b6cc5845d3.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/216a36dd-6c4d-4310-87f4-539a9382ff12.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/9d23a286-f00c-4984-b2b6-f63672e088e3.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/15e27dc5-c3cf-44d4-980c-fc52c5da84f1.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/9c77cd07-b6f8-4d35-a084-9ac9af1c8823.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2021-01-02/9841b6f0-2b74-4808-be03-20ea3e1b733d.jpeg.a.jpeg\"],\"goods_id\":214846212263,\"desc_txt\":\"低\",\"predict_promotion_rate\":7,\"goods_desc\":\"食品级TPE手套 弹性加厚防油一次性手套餐饮家务美容美发防护手套\",\"opt_name\":\"百货\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2021-01-02/484409d47d6eff005b2da043376f51fe.jpeg\",\"share_rate\":0,\"opt_id\":\"20527\",\"opt_ids\":[22022,9831,10696,40,298,10731,12,8590,10702,9838,8591,15,20527,8592,20690,20530,11190,567,8569,8570,8571,11229,223,9855],\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2021-01-02/9841b6f0-2b74-4808-be03-20ea3e1b733d.jpeg.a.jpeg\",\"has_coupon\":false,\"min_normal_price\":499,\"serv_txt\":\"低\",\"coupon_start_time\":0,\"min_group_price\":399,\"coupon_discount\":0,\"goods_sign\":\"c9b2kG-b9jNKv7uxwfbYgI-pVo_8_JQruzCt6wi\",\"coupon_end_time\":0}],\"request_id\":\"16104190308375212\",\"search_id\":\"3eb1cfe6-53f6-41b2-850e-8dac2b9075f7\"}}";
//        JSONObject parseObject = JSONObject.parseObject(jsonStr4).getJSONObject("goods_basic_detail_response");
//        String listJson = parseObject.getString("list");
//        JSONArray listArray = JSONArray.parseArray(listJson);
//        IntStream.range(0, listArray.size()).forEachOrdered(i -> {
//            JSONObject objJson = listArray.getJSONObject(i);
//            double promotionRate = Double.valueOf(objJson.get("promotion_rate").toString()) * 50 / 100;
//            int payAmount = Integer.valueOf(objJson.get("min_normal_price").toString()) - Integer.valueOf(objJson.get("coupon_discount").toString());
//            //比价行为预判定佣金，需要用户备案
//            objJson.put("predict_promotion_rate", new DecimalFormat(".##").format(Double.valueOf(objJson.get("predict_promotion_rate").toString()) * 50 / 100));
//            //佣金比例,千分比
//            objJson.put("promotion_rate", new DecimalFormat(".##").format(promotionRate));
//            //佣金
//            objJson.put("promotion_price", new DecimalFormat(".##").format(promotionRate * payAmount / 1000 / 100));
//            listArray.set(i, objJson);
//        });
//        parseObject.put("list", listArray);
//        JSONObject parseObjectJson = new JSONObject();
//        parseObjectJson.put("goods_basic_detail_response", parseObject);
//        jsonStr4 = parseObjectJson.toJSONString();
//        System.out.println(jsonStr4);

//        String jsonStr5 = "{\"top_goods_list_get_response\":{\"total\":300,\"list_id\":\"arwen_13843797_78faac9a0651f48013236282c29cd81c\",\"list\":[{\"coupon_remain_quantity\":46000,\"promotion_rate\":140,\"cat_ids\":[239,7297,7322],\"coupon_min_order_amount\":7900,\"mall_id\":9085687,\"mall_name\":\"迦世普文服饰旗舰店\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"高\",\"goods_name\":\"羽绒服男士短款2020年新款秋冬潮流立领亮面加厚白鸭绒潮牌外套\",\"sales_tip\":\"1913\",\"goods_id\":214335563530,\"desc_txt\":\"高\",\"predict_promotion_rate\":140,\"goods_desc\":\"羽绒服男士短款2020年新款秋冬潮流立领亮面加厚白鸭绒潮牌外套\",\"opt_name\":\"男装\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-12-31/060640159f3c9545b4f9323ea74a5737.jpeg\",\"share_rate\":0,\"opt_id\":11841,\"opt_ids\":[11841,11012,8581,8582,8583,10696,20554,10763,12,20492,9805,10703,2575,9808,2579,10902,6361,6362,347,349,9823,225,3297,3298,743,11881,11883,20523,10733,4855,8569,4857,8570,8571],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-12-31/a8f23da4-44c0-4d0d-be39-cc976ad37d22.jpeg.a.jpeg\",\"min_normal_price\":19900,\"serv_txt\":\"高\",\"coupon_start_time\":1610208000,\"min_group_price\":15800,\"coupon_discount\":7900,\"goods_sign\":\"c972k40r2Z5Kv7uxwffYgLNRG6zx_Ju2FZV3DD\",\"coupon_end_time\":1611158399},{\"coupon_remain_quantity\":6100,\"promotion_rate\":210,\"cat_ids\":[17285,17294,17379],\"coupon_min_order_amount\":2400,\"mall_id\":737426594,\"mall_name\":\"纳可旗舰店\",\"coupon_total_quantity\":30000,\"lgst_txt\":\"高\",\"goods_name\":\"纳可卫生巾日夜组合姨妈巾整箱批发超薄棉柔透气经期姨妈卫生巾\",\"sales_tip\":\"3.5万\",\"goods_id\":181041054676,\"desc_txt\":\"高\",\"predict_promotion_rate\":210,\"goods_desc\":\"纳可卫生巾日夜组合姨妈巾整箱批发超薄棉柔透气经期姨妈卫生巾\",\"opt_name\":\"洗护\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-05/0f7d93826af6f187d35a2336b8b15ce6.jpeg\",\"share_rate\":0,\"opt_id\":10110,\"opt_ids\":[10114,10696,11209,10730,8590,10702,8591,8592,22130,10131,11187,20787,22133,8569,8570,8571,21917,10110],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-05/6bc292f3-a31e-4380-882a-fb5a116d594f.jpeg\",\"min_normal_price\":5590,\"serv_txt\":\"高\",\"coupon_start_time\":1609862400,\"min_group_price\":5390,\"coupon_discount\":2400,\"goods_sign\":\"c9j2iEytvUBKv7uxwffYgCxLMTyf_JPJ122oPi\",\"coupon_end_time\":1610467199},{\"coupon_remain_quantity\":42000,\"promotion_rate\":210,\"cat_ids\":[6630,6631,6640,7568],\"coupon_min_order_amount\":2900,\"mall_id\":852631497,\"mall_name\":\"千禾旗舰店\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"高\",\"goods_name\":\"【超级无敌划算】千禾酱油御藏本酿380天特级生抽 零添加酿造酱油\",\"sales_tip\":\"1.3万\",\"goods_id\":199820163241,\"desc_txt\":\"高\",\"predict_promotion_rate\":210,\"goods_desc\":\"【超级无敌划算】千禾酱油御藏本酿380天特级生抽 零添加酿造酱油\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-26/506f7610647d9f552b7b7ac2dfba5f86.jpeg\",\"share_rate\":0,\"opt_id\":1,\"opt_ids\":[1,10723,20740,8584,10696,232,8585,10025,8586,10700,12,22926,22931,11542,9975,8569,8570,8571,219,124,9980,22972,127,11839],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-13/bd58cc49-c763-4e9c-b7da-b115278d16c7.jpeg.a.jpeg\",\"min_normal_price\":5090,\"serv_txt\":\"高\",\"coupon_start_time\":1609603200,\"min_group_price\":4990,\"coupon_discount\":2900,\"goods_sign\":\"c9_2jOx7Rj1Kv7uxwffYgIkZb2Cb_JQxzbECIGB\",\"coupon_end_time\":1614527999},{\"coupon_remain_quantity\":30000,\"promotion_rate\":210,\"cat_ids\":[16989,17002,17087],\"coupon_min_order_amount\":1000,\"mall_id\":365688790,\"mall_name\":\"家家备生活用品\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"低\",\"goods_name\":\"【60卷7.2斤巨量装】60卷/12卷本色卫生纸卷纸批发家用纸巾卷纸\",\"sales_tip\":\"4466\",\"goods_id\":166134740716,\"desc_txt\":\"低\",\"predict_promotion_rate\":210,\"goods_desc\":\"【60卷7.2斤巨量装】60卷/12卷本色卫生纸卷纸批发家用纸巾卷纸\",\"opt_name\":\"海淘\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-08-16/01b2832fe8e3865c0486ffe0ba0b4963.jpeg\",\"share_rate\":0,\"opt_id\":12,\"opt_ids\":[294,10696,10729,329,12,20717,8590,10702,8591,15,20527,8592,20530,11254,8569,22009,8570,8571,11611,223,415],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://t00img.yangkeduo.com/openapi/images/2020-08-16/5ebe93ce9d47561e4b2bb4f8b910122c.jpg\",\"min_normal_price\":8900,\"serv_txt\":\"低\",\"coupon_start_time\":1609862400,\"min_group_price\":2490,\"coupon_discount\":1000,\"goods_sign\":\"c9X2hMQoCHhKv7uxwffYgOUXOkRX_JDKK8nqfi\",\"coupon_end_time\":1612108799},{\"coupon_remain_quantity\":42000,\"promotion_rate\":70,\"cat_ids\":[8172,8182,8250],\"coupon_min_order_amount\":400,\"mall_id\":682660930,\"mall_name\":\"动动客旗舰店\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"高\",\"goods_name\":\"现摘现发湖南麻阳冰糖橙当季新鲜水果超甜橙子手剥小甜橙10斤装\",\"sales_tip\":\"6.1万\",\"goods_id\":213780811483,\"desc_txt\":\"高\",\"predict_promotion_rate\":70,\"goods_desc\":\"现摘现发湖南麻阳冰糖橙当季新鲜水果超甜橙子手剥小甜橙10斤装\",\"opt_name\":\"水果\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-12-30/a0eb25b82eab4a22ee43797677d38feb.jpeg\",\"share_rate\":0,\"opt_id\":13,\"opt_ids\":[5121,5122,10723,22884,165,10696,22280,22281,22922,9419,10700,140,9420,13,12402,9439,22879],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-12-30/332a4d85-f331-4185-8cbe-4c6909275bed.jpeg.a.jpeg\",\"min_normal_price\":1690,\"serv_txt\":\"高\",\"coupon_start_time\":1610244000,\"min_group_price\":1490,\"coupon_discount\":400,\"goods_sign\":\"c9D2k6wasE9Kv7uxwffYgHgJrVTd_JQgJOM64j2\",\"coupon_end_time\":1610848799},{\"coupon_remain_quantity\":46000,\"promotion_rate\":175,\"cat_ids\":[17285,17294,17380],\"coupon_min_order_amount\":600,\"mall_id\":647189277,\"mall_name\":\"舒菲娜家居生活官方旗舰店\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"高\",\"goods_name\":\"舒菲娜超薄透气棉柔表层卫生巾女日用 夜用 护垫组合装学生姨妈巾\",\"sales_tip\":\"2.5万\",\"goods_id\":185598050711,\"desc_txt\":\"高\",\"predict_promotion_rate\":175,\"goods_desc\":\"舒菲娜超薄透气棉柔表层卫生巾女日用 夜用 护垫组合装学生姨妈巾\",\"opt_name\":\"洗护\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-10-09/2394574c78555fd82a8d75d631eb492f.jpeg\",\"share_rate\":35,\"opt_id\":10110,\"opt_ids\":[10114,10696,328,11209,10730,8590,10702,8591,15,8592,22130,10131,11187,20787,405,22133,8569,8570,8571,21917,10110],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-10-09/1f0836f5-6c66-4452-80da-405f0753e321.jpeg.a.jpeg\",\"min_normal_price\":1700,\"serv_txt\":\"高\",\"coupon_start_time\":1610035200,\"min_group_price\":1590,\"coupon_discount\":600,\"goods_sign\":\"c932iVzPfwNKv7uxwffYgNUVPYAB_JoQu8MDMH\",\"coupon_end_time\":1610899199},{\"coupon_remain_quantity\":3100,\"promotion_rate\":70,\"cat_ids\":[6630,6709,6723],\"coupon_min_order_amount\":10000,\"mall_id\":926126442,\"mall_name\":\"海之源粮油店\",\"coupon_total_quantity\":5000,\"lgst_txt\":\"高\",\"goods_name\":\"【领券立减100】 一级花生非转基因压榨花生芝麻食用油两桶共10斤\",\"sales_tip\":\"1.7万\",\"goods_id\":31772456073,\"desc_txt\":\"高\",\"predict_promotion_rate\":70,\"goods_desc\":\"2.7升*2桶 组合装花生油搭档花生油芝麻油玉米油调和而成食用油\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-07-21/ccd0d378ad67345af0e3dc340db257fe.jpeg\",\"share_rate\":0,\"opt_id\":1,\"opt_ids\":[1,130,10723,20739,10021,8584,10696,232,8585,8586,10700,12,22926,22931,11542,9975,8569,22969,8570,8571,219,11836,124,9980],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-07-21/c5837cc4-2403-4fd5-9f54-fa52f9379626.jpg.a.jpeg\",\"min_normal_price\":17090,\"serv_txt\":\"高\",\"coupon_start_time\":1610035200,\"min_group_price\":16990,\"coupon_discount\":10000,\"goods_sign\":\"c9L2pQ-Hyh1Kv7uxwffYgNL4NAlU_JQqBrQfRhv\",\"coupon_end_time\":1610467199},{\"coupon_remain_quantity\":73968,\"promotion_rate\":140,\"cat_ids\":[8439,8447,8472],\"coupon_min_order_amount\":0,\"mall_id\":195952131,\"mall_name\":\"新潮流少女服装店\",\"coupon_total_quantity\":121968,\"lgst_txt\":\"高\",\"goods_name\":\"德绒发热打底裤女秋冬季无痕双面加绒加厚保暖秋裤内穿修身小脚裤\",\"sales_tip\":\"1.9万\",\"goods_id\":207889188904,\"desc_txt\":\"高\",\"predict_promotion_rate\":140,\"goods_desc\":\"德绒发热打底裤女秋冬季无痕双面加绒加厚保暖秋裤内穿修身小脚裤\",\"opt_name\":\"女装\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-12-10/adeb75f4994be29df1f78a3a5d2cb590.jpeg\",\"share_rate\":0,\"opt_id\":13616,\"opt_ids\":[13632,13764,10696,17608,12,2701,14,20494,10703,2706,9490,9492,6166,2711,17370,347,11995,20509,350,13854,17374,12000,225,20579,9510,17513,17386,11116,10733,17518,13616,52,13620,8569,8570,8571,8572,8573,8574,13759],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-12-10/12b6aa07-f472-4f7e-ada8-c5ba0dae15c3.jpeg.a.jpeg\",\"min_normal_price\":1500,\"serv_txt\":\"高\",\"coupon_start_time\":1608739200,\"min_group_price\":1290,\"coupon_discount\":300,\"goods_sign\":\"c972kg1ntrxKv7uxwffYgPeaEuYe_JiL8hFA54\",\"coupon_end_time\":1638028799},{\"coupon_remain_quantity\":1999,\"promotion_rate\":140,\"cat_ids\":[8172,8182,8269],\"coupon_min_order_amount\":100,\"mall_id\":424243058,\"mall_name\":\"皮蛋献果官方旗舰店\",\"coupon_total_quantity\":1999,\"lgst_txt\":\"高\",\"goods_name\":\"【限时特价/领券立减】10斤装红富士苹果现摘现发脆甜多汁丑苹果\",\"sales_tip\":\"1万\",\"goods_id\":186474691642,\"desc_txt\":\"高\",\"predict_promotion_rate\":140,\"goods_desc\":\"【限时特价/领券立减】10斤装红富士苹果现摘现发脆甜多汁丑苹果\",\"opt_name\":\"海淘\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-10-11/0d4336637d11175433c232c1b3002e08.jpeg\",\"share_rate\":0,\"opt_id\":10696,\"opt_ids\":[10723,22884,10696,22280,22281,22922,171,9419,10700,140,9420,13,2446,2447,9424,12402,22879],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-10-11/2a88a2ff-800c-4eab-83e1-0ad79f768091.jpeg.a.jpeg\",\"min_normal_price\":5600,\"serv_txt\":\"高\",\"coupon_start_time\":1609689600,\"min_group_price\":4390,\"coupon_discount\":100,\"goods_sign\":\"c972iQCPAq5Kv7uxwffYgEhmlUZS_JQaQo05k9i\",\"coupon_end_time\":1610553599},{\"coupon_remain_quantity\":33000,\"promotion_rate\":140,\"cat_ids\":[6398,6399,6414],\"coupon_min_order_amount\":2000,\"mall_id\":39959,\"mall_name\":\"润梦食品专营店\",\"coupon_total_quantity\":50000,\"lgst_txt\":\"高\",\"goods_name\":\"坚果零食干果炭烧腰果仁原味批发休闲零食大礼包盐焗带皮250g500g\",\"sales_tip\":\"10万+\",\"goods_id\":1700250,\"desc_txt\":\"高\",\"predict_promotion_rate\":140,\"goods_desc\":\"坚果零食干果炭烧腰果仁原味批发休闲零食大礼包盐焗带皮250g500g\",\"opt_name\":\"食品\",\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-09-21/2a2663bb9b84f79d29b494f2efb6daf2.jpeg\",\"share_rate\":0,\"opt_id\":1,\"opt_ids\":[1,8836,23557,8584,10696,8585,8586,10700,12,22926,22932,22297,10009,219,96,21857,10723,11876,228,22953,5867,9975,8569,8570,8571,9979],\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\",\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-09-21/2583474b-f421-4252-a1f1-0598fa6412a1.jpeg.a.jpeg\",\"min_normal_price\":2990,\"serv_txt\":\"高\",\"coupon_start_time\":1610294400,\"min_group_price\":2890,\"coupon_discount\":2000,\"goods_sign\":\"c972ompXDw5Kv7uxwffYgFqz-Zze_JaZ5o5DdB\",\"coupon_end_time\":1612108799}],\"request_id\":\"16104209037679622\",\"search_id\":\"42273abd216454507ab62b4f57b657b6eb\"}}";
//        JSONObject parseObject = JSONObject.parseObject(jsonStr5).getJSONObject("top_goods_list_get_response");
//        String listJson = parseObject.getString("list");
//        JSONArray listArray = JSONArray.parseArray(listJson);
//        IntStream.range(0, listArray.size()).forEachOrdered(i -> {
//        JSONObject objJson = listArray.getJSONObject(i);
//        double promotionRate = Double.valueOf(objJson.get("promotion_rate").toString()) * 50 / 100;
//        int payAmount = Integer.valueOf(objJson.get("min_normal_price").toString()) - Integer.valueOf(objJson.get("coupon_discount").toString());
//        //比价行为预判定佣金，需要用户备案
//        objJson.put("predict_promotion_rate", new DecimalFormat(".##").format(Double.valueOf(objJson.get("predict_promotion_rate").toString()) * 50 / 100));
//        //佣金比例,千分比
//        objJson.put("promotion_rate", new DecimalFormat(".##").format(promotionRate));
//        //佣金
//        objJson.put("promotion_price", new DecimalFormat(".##").format(promotionRate * payAmount / 1000 / 100));
//        listArray.set(i, objJson);
//        });
//        parseObject.put("list", listArray);
//        JSONObject parseObjectJson = new JSONObject();
//        parseObjectJson.put("top_goods_list_get_response", parseObject);
//        jsonStr5 = parseObjectJson.toJSONString();
//        System.out.println(jsonStr5);

        String jsonStr6 = "{\"goods_detail_response\":{\"goods_details\":[{\"mall_coupon_remain_quantity\":0,\"plan_type\":4,\"category_name\":\"洗护\",\"coupon_remain_quantity\":6100,\"promotion_rate\":210,\"cat_ids\":[17285,17294,17379],\"coupon_min_order_amount\":2400,\"category_id\":10110,\"mall_coupon_discount_pct\":0,\"mall_id\":737426594,\"mall_name\":\"纳可旗舰店\",\"coupon_total_quantity\":30000,\"mall_coupon_end_time\":0,\"mall_coupon_min_order_amount\":0,\"merchant_type\":3,\"lgst_txt\":\"高\",\"goods_name\":\"纳可卫生巾日夜组合姨妈巾整箱批发超薄棉柔透气经期姨妈卫生巾\",\"sales_tip\":\"3.5万\",\"only_scene_auth\":true,\"goods_gallery_urls\":[\"https://img.pddpic.com/mms-material-img/2020-11-05/6bc292f3-a31e-4380-882a-fb5a116d594f.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-14/e520b2a9-f293-4b84-930e-2ed438c6c1c0.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-10-26/07c37fc0-1aa4-45ae-9f3a-b0550a314ff7.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-09-15/69400731-0d26-43a2-aed2-7ce4dfd6fe5e.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-09-15/6f5a7ab2-32b7-44b0-aa80-38797d8b6e72.jpeg.a.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-07-21/aa984089-33a1-472a-a19e-e02901025a8a.jpg\",\"https://img.pddpic.com/mms-material-img/2020-07-21/3f16ffec-5817-43be-8eba-0f3349244dbc.jpg\",\"https://img.pddpic.com/mms-material-img/2020-07-21/e908a1f9-181f-4e38-896e-83c54cf26e67.jpg\",\"https://img.pddpic.com/mms-material-img/2020-09-15/7a66b3c1-146e-4b15-9982-3709ee236aa7.jpeg\",\"https://img.pddpic.com/mms-material-img/2020-08-14/5a50cc21-9da3-487b-b2b1-dec32b6b4911.jpeg\"],\"goods_id\":181041054676,\"predict_promotion_rate\":210,\"desc_txt\":\"高\",\"goods_desc\":\"纳可卫生巾日夜组合姨妈巾整箱批发超薄棉柔透气经期姨妈卫生巾\",\"opt_name\":\"洗护\",\"share_rate\":0,\"goods_thumbnail_url\":\"https://t00img.yangkeduo.com/goods/images/2020-11-05/0f7d93826af6f187d35a2336b8b15ce6.jpeg\",\"opt_ids\":[10114,10696,11209,10730,8590,10702,8591,8592,22130,10131,11187,20787,22133,8569,8570,8571,21917,10110],\"opt_id\":10110,\"goods_image_url\":\"https://img.pddpic.com/mms-material-img/2020-11-05/6bc292f3-a31e-4380-882a-fb5a116d594f.jpeg\",\"has_mall_coupon\":false,\"has_coupon\":true,\"min_normal_price\":5590,\"mall_coupon_start_time\":0,\"serv_txt\":\"高\",\"video_urls\":[\"https://video3.yangkeduo.com/i1/2020-03-25/c1799a645787b25301b857c083b736d6.mp4\"],\"mall_coupon_total_quantity\":0,\"mall_coupon_max_discount_amount\":0,\"coupon_start_time\":1609862400,\"min_group_price\":5390,\"mall_cps\":1,\"coupon_discount\":2400,\"goods_sign\":\"c9j2iEytvUBKv7uxwffYgCxLMTyf_JPJ122oPi\",\"coupon_end_time\":1610467199,\"zs_duo_id\":9568934}],\"request_id\":\"16104215233848764\"}}";
        JSONObject parseObject = JSONObject.parseObject(jsonStr6).getJSONObject("goods_detail_response");
        String goodsDetailsJson = parseObject.getString("goods_details");
        JSONArray goodsDetailsArray = JSONArray.parseArray(goodsDetailsJson);
        IntStream.range(0, goodsDetailsArray.size()).forEachOrdered(i -> {
            JSONObject objJson = goodsDetailsArray.getJSONObject(i);
            double promotionRate = Double.valueOf(objJson.get("promotion_rate").toString()) * 50 / 100;
            int payAmount = Integer.valueOf(objJson.get("min_normal_price").toString()) - Integer.valueOf(objJson.get("coupon_discount").toString());
            //比价行为预判定佣金，需要用户备案
            objJson.put("predict_promotion_rate", new DecimalFormat(".##").format(Double.valueOf(objJson.get("predict_promotion_rate").toString()) * 50 / 100));
            //佣金比例,千分比
            objJson.put("promotion_rate", new DecimalFormat(".##").format(promotionRate));
            //佣金
            objJson.put("promotion_price", new DecimalFormat(".##").format(promotionRate * payAmount / 1000 / 100));
            goodsDetailsArray.set(i, objJson);
        });
        parseObject.put("goods_details", goodsDetailsArray);
        JSONObject parseObjectJson = new JSONObject();
        parseObjectJson.put("goods_detail_response", parseObject);
        jsonStr6 = parseObjectJson.toJSONString();
        System.out.println(jsonStr6);
    }
}
